package com.hkq.mall.member.controller;

import com.hkq.common.utils.R;
import com.hkq.mall.member.feign.CouponFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member/test")
public class TestFeignController {
    @Autowired
    CouponFeignService couponFeignService;
    @RequestMapping("/testFeign")
    public R testCoupon() {
        R r = couponFeignService.getCouponList();
        Object page = r.get("page");
        System.out.println(page.getClass().getName());
        return R.ok().put("coupon", page);
    }
}
